package com.ruoyi.house.service.param;

import com.alibaba.druid.util.StringUtils;
import com.ruoyi.house.enums.UserType;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;

@lombok.Getter
@lombok.Setter
@lombok.ToString
public class CustomerBaseParam extends BaseParam {
	public CustomerBaseParam() {
		super(UserType.C_USER);
		String userId = (String)RequestContextHolder.getRequestAttributes().getAttribute("LOGIN_USER_KEY", RequestAttributes.SCOPE_REQUEST);
		//this.loginUserId = Long.valueOf(userId);
		if (!StringUtils.isEmpty(userId)) {
			this.loginUserId = Long.valueOf(userId);
		}
	}
}
